home *** CD-ROM | disk | FTP | other *** search
- On Fri, 2 Dec 1994, Marco Beretta wrote:
-
- >
- >
- > > I haven't test it but I think you can use banks.Say you have a
- > > bank and you want to change its length.Just reserve a new one with
- > > the desirable size and copy the contents of the old, to the new
- > > one.
- > > Example:
- > > During runtime you access Bank No #1
- > >
- > > bnum=1
- > > reserve as work bnum,<size>
- > > .
- > > .
- > > .
- > > reserve as work 999,<new size>
- > > copy bnum to 999 ' I don't remember the command now (I'm at the
- > > Univ.
- > > reserve as work bnum,<new size>
- > > copy 999 to bnum
- >
- > Well, about dynamic banks...
- > I thought on them for some time and cannot Paul add a
- > Banklenghtadd(bytes) command? I don't know, call it Elbnkadd(number,bytes)
- > or better Elbnkadd(number of the bank, position, bytes).
- > This will solve many problems.
- > Poking directly with the bank's lenght is quite dangerous as you could
- > overlap memory used for something else.
- > And copying the bank is quite slow if you have a large bank.
- >
- > Any ideas or comment?
- >
- How about using MakeLib extension (1.6kb) which has some nice mem.
- allocation + list handling routines ??
-
- Like:
-
- BUFFER = Ma Malloc (1024,MEM_PUBLIC)
- if BUFFER
- <Do what ever you want to do for BUFFER (1024 bytes)>
- Ma Free (BUFFER) : Rem Free BUFFER
- End If
-
- You can also forget Ma Free or can use Ma Free All (Which is
- automatically executed when quitting AMOSPro or compiled AMOS
- program)
-
- This is something I call _dynamic_ memory allocationg AMOS banks(tm)
- sucks.
-
- The M.
-
- > M&F
- >
-
- Marko Turunen
- Sairaalakatu 9 B 30 marturun@messi.uku.fi
- 70110 Kuopio marturun@majakka.uku.fi
- P. 971 - 2821 661
-
-